package com.ayf.payment.game.api.channel.ayb.response;

import com.alibaba.fastjson.annotation.JSONField;
import com.swwx.charm.commons.lang.base.BasicTO;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;

@Data
public class BaseRes implements Serializable {

    private static final long serialVersionUID = 1L;

    private String code;

    private String msg;

    /**
     * 接口响应是否成功
     */
    public boolean reqSuccessFlag;
    /**
     * 业务处理是否成功
     */
    private boolean isSuccess;

    /**
     * 失败原因
     */
    private String failRason;



    public boolean isSuccess() {
        return "200".equals(code);
    }

    public String getFailRason() {
        if (!isSuccess) {
            return msg;
        }
        return "";
    }
}
